Crate gix_trace

source ·
Expand description

A crate providing macros for creating spans in various detail levels. coarse! should be used for top-level operations, whereas detail! should be used in plumbing crates unless their operations are likely to cost a lot of time.

The application is supposed to explicitly turn on tracing via gix-features. Crates that use gix-features should use gix_features::trace, and those who don’t can use gix_trace directly.

§Feature Flags

  • default — Note that there is no default feature, as the application is supposed to opt-in via gix-features or using this crate directly.

  • tracing — Implement tracing with tracing-core, which provides applications with valuable performance details if they opt-in to it.

    Note that this may have overhead as well, thus instrumentations should be used stategically, only providing coarse tracing by default and adding details only where needed while marking them with the appropriate level.

  • tracing-detail — If enabled, detailed tracing is also emitted, which can greatly increase insights but at a cost.

Modules§

Macros§

Structs§

  • Spantracing
    An entered span which will exit on drop.

Enums§

  • The level at which the tracing item should be created.

Constants§

  • MAX_LEVELtracing-detail
    The maximum allowed level for tracing items, as compiled in.